package com.wallet.service.Impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wallet.dao.RoleDao;
import com.wallet.entity.Role;
import com.wallet.entity.example.RoleExample;
import com.wallet.entity.result.JsonResult;
import com.wallet.service.BaseService;

@Service
public class RoleServiceImpl implements BaseService<Role, RoleExample> {
	
	@Autowired
	private RoleDao roleDao;

	@Override
	public int save(Role t) {
		return roleDao.insert(t);
	}

	@Override
	public int insertBatch(List<Role> list) {
		return roleDao.insertBatch(list);
	}

	@Override
	public int del(Integer id) {
		return roleDao.deleteByPrimaryKey(id);
	}

	@Override
	public int upd(Role t) {
		return roleDao.updateByPrimaryKey(t);
	}

	@Override
	public Role getDetail(Integer id) {
		return roleDao.selectByPrimaryKey(id);
	}

	@Override
	public JsonResult showPage(Integer page, Integer size) {
		return null;
	}

	@Override
	public Integer getCount() {
		return null;
	}

	@Override
	public List<Role> selectAll() {
		return roleDao.selectAll();
	}

	@Override
	public List<Role> selectByExample(RoleExample example) {
		return roleDao.selectByExample(example);
	}

}
